Skip to content

Rotation#2

Open
Clulogh wants to merge 5 commits intomainfrom
Rotation
Open

Rotation#2
Clulogh wants to merge 5 commits intomainfrom
Rotation

Conversation

@Clulogh
Copy link
Copy Markdown
Owner

@Clulogh Clulogh commented Dec 13, 2025

Whats changing?

Questions/notes for reviewers

How did you test this?

@Clulogh Clulogh requested a review from aschokking December 13, 2025 20:20
currentPostion = pose.getCurrentHeading().getDegrees();
double speed = pose.getCurrentHeading().getDegrees() - previousPos;
double error = goal - pose.getCurrentHeading().getDegrees();
double power = error - speed;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ ⭐ this is often where we would multiply error and speed by factors (p and d) so we can tune in different values for how hard it should be trying and how hard it should be braking

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But will this code still work without the tuning?

The tuning will just be used for more advanced controlling right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could go faster in the simulator even by tuning the values, I'm honestly kind of surprised it's working at all right now as is.

@Override
public boolean isFinished() {

//speed, current position,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ ⭐ ⭐ this should be returning if we've reached our goal, like you're doing above with the orientation one. Same idea of low error and low speed can apply here!

@Override
public boolean isFinished() {

return false;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ ⭐ ⭐ same thing here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants